package cn.ad.entity;

import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.util.Date;

@Alias("strategy")
public class Strategy extends PO implements Serializable {
	
	
	/**
	 * 策略表
	 */
	private static final long serialVersionUID = -770741153445643149L;
	
	/**
	 * 资源类型 ：公共资源类型
	 */
	public static final String RESOURCETYPE_PUBLIC = "public";

	/**
	 * 资源类型 ：私有资源类型
	 */
	public static final String RESOURCETYPE_PRIVATE = "private";
	/**
	 * 策略名称
	 */
	private String name;
	/**
	 * 描述
	 */
	private String description;
	/**
	 * 订单编号
	 */
	private int campaignId;
	/**
	 * 优先级排序,  值为 1 ~ 15, 优先级依次降低。
	 */
	private int priority;
	/**
	 * 投放开始时间
	 */
	private Date startTime;
	/**
	 * 投放结束时间
	 */
	private Date endTime;
	/**
	 * 展示总量限制
	 */
	private int maxImpressions;
	/**
	 * 每日最大展示数
	 */
	private int dayImpressions;
	/**
	 * 最大点击数
	 */
	private int maxClicks;
	/**
	 * 每日最大点击数
	 */
	private int dayClicks;
	/**
	 * 预算量限制，描述为预算货币金额，单位i（元）
	 */
	private double budget;
	/**
	 * 每日最大预算金额，单位（元）
	 */
	private double dayBudget;
	/**
	 * 投放速度类型， 0 平均投放  1 越快越好， 默认值为0
	 */
	private int speedMode;
	/**
	 * 投放速度模式数据量依据， 0 点击 1 展示 2 预算。  
	 */
	private int speedBase;
	/**
	 * 更新时间
	 */
	private Date updateTime;
	/**
	 * 状态   -1.删除 0.初始化 1.有效， 默认值 0
	 */
	private Integer status;
	/**
	 * 创建时间
	 */
	private Date createTime;
	
	/**
	 * 购买模式， 0 固定购买 1 竞价购买  默认为0
	 */
	private int buyMode;
	/**
	 * 出价单价, 单位元.
	 */
	private double unitPrice;
	/**
	 * 计费方式 0 按点击计费CPC 1 按展示计费CPM
	 */
	private int feeType;
	/**
	 * 资源类型
	 */
	private String resourceType;

	/**
	 * 冗余字段
	 * resourceType=public时 记录广告形式
	 */
	private String formatType;

	/**
	 * 平台资源类型 1 ADN 2 ADX
	 */
	private String resType;
	/**
	 * 对应 strategy_group.id
	 */
	private int strategyGroupId;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public int getMaxImpressions() {
		return maxImpressions;
	}

	public void setMaxImpressions(int maxImpressions) {
		this.maxImpressions = maxImpressions;
	}

	public int getDayImpressions() {
		return dayImpressions;
	}

	public void setDayImpressions(int dayImpressions) {
		this.dayImpressions = dayImpressions;
	}

	public int getMaxClicks() {
		return maxClicks;
	}

	public void setMaxClicks(int maxClicks) {
		this.maxClicks = maxClicks;
	}

	public int getDayClicks() {
		return dayClicks;
	}

	public void setDayClicks(int dayClicks) {
		this.dayClicks = dayClicks;
	}

	public double getBudget() {
		return budget;
	}

	public void setBudget(double budget) {
		this.budget = budget;
	}

	public double getDayBudget() {
		return dayBudget;
	}

	public void setDayBudget(double dayBudget) {
		this.dayBudget = dayBudget;
	}

	public int getSpeedMode() {
		return speedMode;
	}

	public void setSpeedMode(int speedMode) {
		this.speedMode = speedMode;
	}

	public int getCampaignId() {
		return campaignId;
	}

	public void setCampaignId(int campaignId) {
		this.campaignId = campaignId;
	}

	public int getSpeedBase() {
		return speedBase;
	}

	public void setSpeedBase(int speedBase) {
		this.speedBase = speedBase;
	}

	public int getBuyMode() {
		return buyMode;
	}

	public void setBuyMode(int buyMode) {
		this.buyMode = buyMode;
	}

	public double getUnitPrice() {
		return unitPrice;
	}

	public void setUnitPrice(double unitPrice) {
		this.unitPrice = unitPrice;
	}

	public int getFeeType() {
		return feeType;
	}

	public void setFeeType(int feeType) {
		this.feeType = feeType;
	}

	public String getResourceType() {
		return resourceType;
	}

	public void setResourceType(String resourceType) {
		this.resourceType = resourceType;
	}

	public String getFormatType() {
		return formatType;
	}

	public void setFormatType(String formatType) {
		this.formatType = formatType;
	}

	public String getResType() {
		return resType;
	}

	public void setResType(String resType) {
		this.resType = resType;
	}

	public int getStrategyGroupId() {
		return strategyGroupId;
	}

	public void setStrategyGroupId(int strategyGroupId) {
		this.strategyGroupId = strategyGroupId;
	}
}
